#include <iostream>
#include "../head/gezhongchuangkong.hpp"
#include "../head/guanqiashezhi.hpp"
#include "../head/renwuhewupin.hpp"
#include <string.h>

using namespace std;

wupin::wupin(int __id,int _com,_hid __hid,char _pic,coordinate * coor){

_id = __id;
_complete = _com;
hid = __hid;
pic = _pic;
char ttt[] = "没有任何物品"; 
donh = (context)malloc(sizeof(ttt))/*new char[sizeof(ttt)]*/;
if (hid == NULL){
strcpy((*donh),ttt);
}else{//将输出拥有的物品的名称，如果没有则输出一段对话

}
if (coor !=NULL){
position = coor;
}else{//这里初始化为0
position = new coordinate;
position->x = 0;
position->y = 0;
}

}

void wupin::_comless(int _coml){



}

void wupin::_a_id(int __id){



}

void wupin::_r_id(int __id){



}

void wupin::pr(){

cout<<_id<<endl<<_complete<<endl<<(*donh)<<endl<<pic<<endl<<position->x<<","<<position->y<<endl;

}

wupin::~wupin(){

free(donh);
delete position;

}